A user can log in to a third-party page by using an account of Qzone, Renren, Kaixin, Sina Weibo, Sohu Weibo, Tecent Weibo, Taobao, Douban, MSN, or Google. The login method can gain more effective promotion for the site of the third-party page; can save operational costs of registering an account and costs of subsequently memorizing website accounts and passwords for the user; and can learn rich and valuable content from small and medium-sized websites for an open platform such as Qzone.
At present, most of logins provided by most popular websites may directly provide Andriod and IOS software development kits (SDKs) and the like, and costs of website development are relatively high. However, in an application of an intelligent terminal, many websites do not provide a callback address accessed in a Web manner. Instead, many websites often designate a pseudo protocol in the SDK when the page jumps to a callback address page, end an http request after the page jumps to the callback address page, and directly capture an Access Token parameter from the address.
Logins provided by a part of websites can provide a callback-free address page, for example, Sina Weibo supports a callback-free address page manner, and as shown in FIG. 1, an implementation process is as follows.
1. A login button trigger event of a third-party page is transmitted, by using a message transmission method (postMessage) of a browser, to a platform background service having the same domain name as a login platform.
2. The platform background service opens a new window of a platform login page, and the user completes a login process.
3. The platform login page jumps to a platform cross-domain agent page that is transparent to a third party, and returns related information such as the access Token to the platform cross-domain agent page.
4. The platform cross-domain agent page transmits the related information such as the Access Token to the platform background service.
5. The platform background service transmits the information back to the third-party page by using the browser and notifies that the login is successful.
In the foregoing existing process, the third-party page, the platform background service, and the login platform do not necessarily have the same domain name, that is, the whole process is not necessarily triggered in one event. When the third-party page and the login platform have different domain names, direct communications between the third party and a platform cannot be performed because of the problem of same-origin policy limitations. A part of platforms have implemented some cross-domain communications, but an opened login page may be blocked by the browser at the start step, and implementation mechanism may need to be significantly improved. Moreover, JavaScript SDKs (JS SDKs) provided by some SNS (mainstream social networking services) media websites do not support direct calling of an openAPI, and most of the provided JS SDKs are unavailable in an environment such as an intelligent terminal (or smart terminal), which brings great inconvenience to the development of the third-party page.